<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wechat_corp', function (Blueprint $table) {
            $table->id();
            $table->string('corp_id', 50)->default('')->comment('企业ID');
            $table->string('corp_name', 100)->default('')->comment('企业名称');
            $table->string('corp_scale', 100)->default('')->comment('企业规模');
            $table->string('corp_industry', 100)->default('')->comment('企业类型');
            $table->string('corp_sub_industry', 100)->default('')->comment('企业详细类型');
            $table->string('permanent_code')->default('')->comment('企业永久授权码');
            $table->integer('agentid')->default(0)->comment('应用ID');
            $table->string('name')->default('')->comment('应用名称');
            $table->string('userid')->default('')->comment('用户ID');
            $table->string('open_userid')->default('')->comment('微信openID');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wechat_corp');
    }
};
